.
* gtk/gtkcombo.c (gtk_combo_entry_key_press):
Free 'nprefix', closing a memory leak.
Spaced out the code a bit to make it more readable.
* gtk/gtkhbox.[ch] (gtk_hbox_new),
gtk/gtkvbox.[ch] (gtk_vbox_new):
Change 'homogenous' arg from gint to gboolean.
* gtk/gtktogglebutton.[ch]:
New function gtk_toggle_button_get_active().
+1999-01-20 Jeff Garzik <jgarzik@pobox.com>
+
+ * gtk/gtkcombo.c (gtk_combo_entry_key_press):
+ Free 'nprefix', closing a memory leak.
+ Spaced out the code a bit to make it more readable.
+
+ * gtk/gtkhbox.[ch] (gtk_hbox_new),
+ gtk/gtkvbox.[ch] (gtk_vbox_new):
+ Change 'homogenous' arg from gint to gboolean.
+
+ * gtk/gtktogglebutton.[ch]:
+ New function gtk_toggle_button_get_active().
+
1999-01-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkdnd.c (gtk_drag_get_event_action): Allow button 2 to act
+1999-01-20 Jeff Garzik <jgarzik@pobox.com>
+
+ * gtk/gtkcombo.c (gtk_combo_entry_key_press):
+ Free 'nprefix', closing a memory leak.
+ Spaced out the code a bit to make it more readable.
+
+ * gtk/gtkhbox.[ch] (gtk_hbox_new),
+ gtk/gtkvbox.[ch] (gtk_vbox_new):
+ Change 'homogenous' arg from gint to gboolean.
+
+ * gtk/gtktogglebutton.[ch]:
+ New function gtk_toggle_button_get_active().
+
1999-01-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkdnd.c (gtk_drag_get_event_action): Allow button 2 to act
+1999-01-20 Jeff Garzik <jgarzik@pobox.com>
+
+ * gtk/gtkcombo.c (gtk_combo_entry_key_press):
+ Free 'nprefix', closing a memory leak.
+ Spaced out the code a bit to make it more readable.
+
+ * gtk/gtkhbox.[ch] (gtk_hbox_new),
+ gtk/gtkvbox.[ch] (gtk_vbox_new):
+ Change 'homogenous' arg from gint to gboolean.
+
+ * gtk/gtktogglebutton.[ch]:
+ New function gtk_toggle_button_get_active().
+
1999-01-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkdnd.c (gtk_drag_get_event_action): Allow button 2 to act
+1999-01-20 Jeff Garzik <jgarzik@pobox.com>
+
+ * gtk/gtkcombo.c (gtk_combo_entry_key_press):
+ Free 'nprefix', closing a memory leak.
+ Spaced out the code a bit to make it more readable.
+
+ * gtk/gtkhbox.[ch] (gtk_hbox_new),
+ gtk/gtkvbox.[ch] (gtk_vbox_new):
+ Change 'homogenous' arg from gint to gboolean.
+
+ * gtk/gtktogglebutton.[ch]:
+ New function gtk_toggle_button_get_active().
+
1999-01-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkdnd.c (gtk_drag_get_event_action): Allow button 2 to act
+1999-01-20 Jeff Garzik <jgarzik@pobox.com>
+
+ * gtk/gtkcombo.c (gtk_combo_entry_key_press):
+ Free 'nprefix', closing a memory leak.
+ Spaced out the code a bit to make it more readable.
+
+ * gtk/gtkhbox.[ch] (gtk_hbox_new),
+ gtk/gtkvbox.[ch] (gtk_vbox_new):
+ Change 'homogenous' arg from gint to gboolean.
+
+ * gtk/gtktogglebutton.[ch]:
+ New function gtk_toggle_button_get_active().
+
1999-01-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkdnd.c (gtk_drag_get_event_action): Allow button 2 to act
+1999-01-20 Jeff Garzik <jgarzik@pobox.com>
+
+ * gtk/gtkcombo.c (gtk_combo_entry_key_press):
+ Free 'nprefix', closing a memory leak.
+ Spaced out the code a bit to make it more readable.
+
+ * gtk/gtkhbox.[ch] (gtk_hbox_new),
+ gtk/gtkvbox.[ch] (gtk_vbox_new):
+ Change 'homogenous' arg from gint to gboolean.
+
+ * gtk/gtktogglebutton.[ch]:
+ New function gtk_toggle_button_get_active().
+
1999-01-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkdnd.c (gtk_drag_get_event_action): Allow button 2 to act
+1999-01-20 Jeff Garzik <jgarzik@pobox.com>
+
+ * gtk/gtkcombo.c (gtk_combo_entry_key_press):
+ Free 'nprefix', closing a memory leak.
+ Spaced out the code a bit to make it more readable.
+
+ * gtk/gtkhbox.[ch] (gtk_hbox_new),
+ gtk/gtkvbox.[ch] (gtk_vbox_new):
+ Change 'homogenous' arg from gint to gboolean.
+
+ * gtk/gtktogglebutton.[ch]:
+ New function gtk_toggle_button_get_active().
+
1999-01-20 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkdnd.c (gtk_drag_get_event_action): Allow button 2 to act
gchar* nprefix = NULL;
gint pos;
- if ( !GTK_LIST(combo->list)->children )
+ if ( !GTK_LIST (combo->list)->children )
return FALSE;
gtk_signal_emit_stop_by_name (GTK_OBJECT (entry), "key_press_event");
- cmpl = g_completion_new((GCompletionFunc)gtk_combo_func);
- g_completion_add_items(cmpl, GTK_LIST(combo->list)->children);
- pos = GTK_EDITABLE(entry)->current_pos;
- prefix = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, pos);
+
+ cmpl = g_completion_new ((GCompletionFunc)gtk_combo_func);
+ g_completion_add_items (cmpl, GTK_LIST (combo->list)->children);
+
+ pos = GTK_EDITABLE (entry)->current_pos;
+ prefix = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, pos);
+
g_completion_complete(cmpl, prefix, &nprefix);
- if (nprefix && strlen(nprefix) > strlen(prefix))
+
+ if (nprefix && strlen (nprefix) > strlen (prefix))
{
- gtk_editable_insert_text(GTK_EDITABLE(entry), nprefix+pos,
- strlen(nprefix)-strlen(prefix), &pos);
- GTK_EDITABLE(entry)->current_pos = pos;
+ gtk_editable_insert_text (GTK_EDITABLE (entry), nprefix + pos,
+ strlen (nprefix) - strlen (prefix), &pos);
+ GTK_EDITABLE (entry)->current_pos = pos;
}
- g_free(prefix);
- g_completion_free(cmpl);
+
+ if (nprefix)
+ g_free (nprefix);
+ g_free (prefix);
+ g_completion_free (cmpl);
+
return TRUE;
}
+
if (!combo->use_arrows || !GTK_LIST (combo->list)->children)
return FALSE;
+
li = g_list_find (GTK_LIST (combo->list)->children, gtk_combo_find (combo));
if ((event->keyval == GDK_Up)
}
GtkWidget*
-gtk_hbox_new (gint homogeneous,
+gtk_hbox_new (gboolean homogeneous,
gint spacing)
{
GtkHBox *hbox;
GtkType gtk_hbox_get_type (void);
-GtkWidget* gtk_hbox_new (gint homogeneous,
+GtkWidget* gtk_hbox_new (gboolean homogeneous,
gint spacing);
}
}
+
void
gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
gboolean is_active)
gtk_button_clicked (GTK_BUTTON (toggle_button));
}
+
+gboolean
+gtk_toggle_button_get_active (GtkToggleButton *toggle_button)
+{
+ g_return_val_if_fail (toggle_button != NULL, FALSE);
+ g_return_val_if_fail (GTK_IS_TOGGLE_BUTTON (toggle_button), FALSE);
+
+ return (toggle_button->active) ? TRUE : FALSE;
+}
+
+
void
gtk_toggle_button_toggled (GtkToggleButton *toggle_button)
{
gboolean draw_indicator);
void gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
gboolean is_active);
+gboolean gtk_toggle_button_get_active (GtkToggleButton *toggle_button);
void gtk_toggle_button_toggled (GtkToggleButton *toggle_button);
}
GtkWidget*
-gtk_vbox_new (gint homogeneous,
+gtk_vbox_new (gboolean homogeneous,
gint spacing)
{
GtkVBox *vbox;
GtkType gtk_vbox_get_type (void);
-GtkWidget* gtk_vbox_new (gint homogeneous,
+GtkWidget* gtk_vbox_new (gboolean homogeneous,
gint spacing);